<template>
  <a-avatar :size="size" :style="style">
    <slot />
  </a-avatar>
</template>

<script>
export default {
  name: 'DAvatar',
  props: {
    size: {
      type: Number,
      default: 28
    },
    color: {
      type: String,
      default: '#2174E1'
    },
    backgroundColor: {
      type: String,
      default: '#EDF2F8'
    },
    fontSize: {
      type: Number,
      default: 13
    }
  },
  computed: {
    style() {
      return {
        color: this.color,
        backgroundColor: this.backgroundColor,
        fontSize: this.fontSize,
        fontWeight: 600
      };
    }
  }
};
</script>

<style lang="scss" scoped></style>
